import { getToken } from "@/utils"
import { Navigate } from "react-router-dom"

export function AuthRoute({children}){
  const token=getToken()
  if(token){
    return <div>{children}</div>
  }else {
    return <Navigate to={'/login'}></Navigate>
  }
}